<?php


namespace App\Admin\Controller;


use SinglePHP\BaseController;
use SinglePHP\Cookie;

class AdminBase extends BaseController
{
    public function __construct()
    {
        parent::__construct();

        $this->isLogin();
    }
    protected function isLogin(){
        $identity = Cookie::get('identity');
        if(!isset($identity['username'])){
            $this->redirect('/admin.php/admin/account/login');
        }
    }
}